package anni.aerp2.domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import anni.core.grid.LongGridBean;

import org.hibernate.annotations.GenericGenerator;


/**
 * Erp2Bid generated by Lingo.
 *
 * @author Lingo
 * @since 2007年11月07日 上午 11时12分14秒265
 */
@Entity
@Table(name = "A_ERP2_BID")
public class Erp2Bid extends LongGridBean {
    /** * serial. */
    static final long serialVersionUID = 0L;

    /** * id. */
    private Long id;

    /** * erp2Product. */
    private Erp2Product erp2Product;

    /** * code. */
    private String code;

    /** * productNum. */
    private Integer productNum;

    /** * parameter. */
    private String parameter;

    /** * startDate. */
    private Date startDate;

    /** * endDate. */
    private Date endDate;

    /** * openDate. */
    private Date openDate;

    /** * descn. */
    private String descn;

    /** * erp2InviteBids. */
    private Set<Erp2InviteBid> erp2InviteBids = new HashSet<Erp2InviteBid>(0);

    /** * 构造方法. */
    public Erp2Bid() {
    }

    /** * @return id. */
    @GenericGenerator(name = "generator", strategy = "increment")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    /** * @param id Long. */
    public void setId(Long id) {
        this.id = id;
    }

    /** * @return erp2Product. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PRODUCT_ID")
    public Erp2Product getErp2Product() {
        return erp2Product;
    }

    /** * @param erp2Product Erp2Product. */
    public void setErp2Product(Erp2Product erp2Product) {
        this.erp2Product = erp2Product;
    }

    /** * @return code. */
    @Column(name = "CODE", length = 50)
    public String getCode() {
        return code;
    }

    /** * @param code String. */
    public void setCode(String code) {
        this.code = code;
    }

    /** * @return productNum. */
    @Column(name = "PRODUCT_NUM")
    public Integer getProductNum() {
        return productNum;
    }

    /** * @param productNum Integer. */
    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    /** * @return parameter. */
    @Column(name = "PARAMETER", length = 200)
    public String getParameter() {
        return parameter;
    }

    /** * @param parameter String. */
    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    /** * @return startDate. */
    @Column(name = "START_DATE")
    public Date getStartDate() {
        return startDate;
    }

    /** * @param startDate Date. */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /** * @return endDate. */
    @Column(name = "END_DATE")
    public Date getEndDate() {
        return endDate;
    }

    /** * @param endDate Date. */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /** * @return openDate. */
    @Column(name = "OPEN_DATE")
    public Date getOpenDate() {
        return openDate;
    }

    /** * @param openDate Date. */
    public void setOpenDate(Date openDate) {
        this.openDate = openDate;
    }

    /** * @return descn. */
    @Column(name = "DESCN", length = 2000)
    @Lob
    public String getDescn() {
        return descn;
    }

    /** * @param descn String. */
    public void setDescn(String descn) {
        this.descn = descn;
    }

    /** * @return erp2InviteBids. */
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "erp2Bid")
    public Set<Erp2InviteBid> getErp2InviteBids() {
        return erp2InviteBids;
    }

    /** * @param erp2InviteBids Set. */
    public void setErp2InviteBids(Set<Erp2InviteBid> erp2InviteBids) {
        this.erp2InviteBids = erp2InviteBids;
    }
}
